#!/bin/sh
cd /data/git/wenan/
git checkout -- *
git pull origin master

if [ $? -eq 0 ];then
    chown -R www.www /data/git/wenan/
    chmod -R 755 /data/git/wenan/
    rsync -a --exclude='.git/' --exclude='.env' --exclude='.user.ini' --exclude='task/git_update.sh'  --exclude='README.md'  /data/git/wenan/ /www/wwwroot/staffqihu/wenan
    chown -R www:www /www/wwwroot/staffqihu/wenan

    rm -rf /www/wwwroot/staffqihu/wenan/runtime/temp/*
else
    echo "代码拉去失败"
fi